var e = require("../../../api.js"), t = getApp(), a = require("../../../utils/function.js");

Page({
    data: {
        img: a.userImg,
        evaluateList: [ {
            title: "技术棒",
            count: 5
        }, {
            title: "人超好",
            count: 5
        }, {
            title: "服务好",
            count: 5
        }, {
            title: "驾驶平稳",
            count: 5
        }, {
            title: "有礼貌",
            count: 5
        }, {
            title: "专业",
            count: 5
        }, {
            title: "神准时",
            count: 5
        }, {
            title: "接驾太慢",
            count: 5
        } ],
        page: 1,
        evaluate: [],
        percentage: 0
    },
    onLoad: function(e) {
        e.uid && t.shareCouponsMessage(e.uid);
    },
    onReady: function() {},
    onShow: function() {
        var a = this;
        wx.showLoading({}), t.request({
            url: e.order_comment.commentlist,
            method: "post",
            data: {},
            success: function(e) {
                wx.hideLoading(), console.log("代驾人员评论列表", e), a.setData({
                    evaluateList: e.data.problem,
                    evaluate: e.data.res.data,
                    percentage: e.data.percentage
                });
            }
        });
    },
    onHide: function() {},
    onUnload: function() {},
    onReachBottom: function() {
        var a = this;
        wx.showNavigationBarLoading();
        var o = this.data.page;
        o++, this.setData({
            page: o
        });
        var s = this.data.evaluate;
        t.request({
            url: e.order_comment.commentlist,
            method: "post",
            data: {
                page: o
            },
            success: function(e) {
                var t = e.data.res.data;
                if (0 != t.length) for (var o = 0; o < t.length; o++) s.push(t[o]);
                console.log("代驾人员评论列表", e), a.setData({
                    evaluateList: e.data.problem,
                    evaluate: s,
                    percentage: e.data.percentage
                }), wx.hideNavigationBarLoading();
            }
        });
    },
    onShareAppMessage: function() {
        var e = t.shareAppMessage().title, a = t.shareAppMessage().imageUrl, o = t.shareAppMessage().desc, s = t.shareAppMessage().path;
        return console.log(t.shareAppMessage()), {
            title: e,
            imageUrl: a,
            desc: o,
            path: s
        };
    }
});